import request from '@/utils/request'

interface ResponseData {
  list: [],
  totalPage: 0,
  total: 0,
}
// 合作方收款单接口

/**
 * 确认收款单
 * @param params
 * @returns
 */
export const confirmSettlement = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/confirm', data)

/**
 * 作废收款单
 * @param params
 * @returns
 */
export const invalidSettlement = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/invalid', data)

/**
 * 开票收款单
 * @param params
 * @returns
 */
export const invoiceIssuance = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/invoiceIssuance', data)

/**
 * 收款收款单
 * @param params
 * @returns
 */
export const proceeds = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/proceeds', data)

/**
 * 查询收款单详情
 * @param params
 * @returns
 */
export const querySettlementDetail = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/queryDetail', data)

/**
 * 分页查询收款单明细
 * @param params
 * @returns
 */
export const querySettlementDetailPage = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/queryDetailPage', data)

/**
 * 分页查询收款单
 * @param params
 * @returns
 */
export const querySettlementPage = <T>(data?: any) =>
  request.post<ResponseData>('/admin-core/web/receivableSettlement/v1/queryPage', data)

/**
 * 生成收款单
 * @param params
 * @returns
 */
export const generateSettlement = <T>(data?: any) =>
  request.post<T>('/admin-core/web/receivableSettlement/v1/save', data)
